package com.gzhryc.jdbc.annotaion;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.RetentionPolicy;

/**
 * 描述数据库字段信息的源注释
 * @author 张浩
 * @version 1.0.0
 */
@Target(value=ElementType.FIELD)
@Retention(value=RetentionPolicy.RUNTIME)
public @interface Column {

	/**
	 * 数据库表的列名称
	 * @return
	 */
	public abstract String name() default "";
	
	public abstract String type() default "";
	
	public abstract boolean notNull() default false;
	
	public abstract String defVal() default "";
	
	public abstract boolean autoUpdateTime() default false;
	
	public abstract int length() default 0;
	
	public abstract int decimalLen() default 2;
	
	public abstract String note() default "";
	
}
